package com.central.apps.handler.timeTask;

import com.central.app.common.quartz.QuartzJob;
import com.central.app.handler.factory.HandlerFactory;
import com.central.app.service.HandlerService;
import com.central.apps.dao.MaterialInventory.QueryDao;
import com.central.apps.handler.PmlistHandler;
import com.central.apps.handler.SupplierAccountHandler;
import com.central.bizcommon.model.schedule.JobParams;
import lombok.extern.apachecommons.CommonsLog;
import lombok.extern.slf4j.Slf4j;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Calendar;
import java.util.Date;
import java.util.List;

@Component
@Configuration
@EnableScheduling
@CommonsLog
//供应商台账 黑名单定时任务
//禁止并发执行(Quartz不要并发地执行同一个job定义（这里指一个job类的多个实例）)

public class SupplierAccountTask{
    @Scheduled(cron = "0 25 1 * * ?")
    public void  SupplierAccount() throws Exception {
        SupplierAccountHandler handler= (SupplierAccountHandler) HandlerFactory.getBeanHandler("com.central.apps.handler.SupplierAccountHandler");
        handler.SupplierAccount();
    }
}
